package base.day05;
public class Study4 {
    public static void main(String[] args) {
        //输出水仙花数
        int count = 0;
        for (int number = 100; number <= 999; number++) {
            int gw = number % 10;
            int sw = number / 10 % 10;
            int bw = number / 100 % 10;
            if (gw * gw * gw + sw * sw * sw + bw * bw * bw == number) {
                count++;
                System.out.println(number + "是水仙花数");
            }
        }
        System.out.println("一共有" + count + "个");
    }
}
